package main 
import "fmt"

func main(){
	doDBOperatoiins()
}

func connectToDB(){
	fmt.Println("ok, connected to db")
}

func disconnectFromDb(){
	fmt.Println("ok, disconnect from db")
}

func doDBOperatoiins(){
	connectToDB()
	fmt.Println("Defering the database disconnect.")
	defer disconnectFromDb()
	fmt.Println("Doing some DB operations ...")
	fmt.Println("Oops! some crash or network error ...")
	fmt.Println("Returning form function here!")
	return 
}